package mercurius.fitness.client.ui.menu.items;

import mercurius.fitness.client.Fitness;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.MenuBar;

public class RSSMenu extends MenuBar  {

	public RSSMenu() {
		super(true);
		
		addItem("Exercises",new Command() {

			public void execute() {
				String url = Fitness.get().getURL()+"?action=exerciseFeed";
				if(Fitness.get().getFeedKey().length() > 0) {
					url += "&feedkey=" + Fitness.get().getFeedKey();
				}
				Fitness.open(url);
			}
		});
		
		addItem("Exercises (GPS Only)",new Command() {

			public void execute() {
				String url = Fitness.get().getURL()+"?action=mapFeed";
				if(Fitness.get().getFeedKey().length() > 0) {
					url += "&feedkey=" + Fitness.get().getFeedKey();
				}
				Fitness.open(url);
			}
		});
		
		addItem("Gadgets",new Command() {

			public void execute() {
				String url = Fitness.get().getURL()+"?action=gadgetFeed";
				if(Fitness.get().getFeedKey().length() > 0) {
					url += "&feedkey=" + Fitness.get().getFeedKey();
				}
				Fitness.open(url);
			}
		});
		
		
	}
}